#include <iostream>
#include <map>
#include "Commons/strutils.h"

using namespace Jin;

int main() {

	std::map<tstringv, int>	flags_map = {
		{_T("FLAG1"), 1},
		{_T("FLAG2"), 2}
	};

	auto value1 = GetFlagsValueT(_T("FLAG2"), flags_map);
	auto value2 = GetFlagsValueT(_T("	FLAG2 |  FLAG1 "), flags_map);
	tcout << std::format(_T("Value1 = {}, Value2 = {}"), value1, value2) << std::endl;

	StringSplit split(_T(" FLAG3 |  FLAG4 "), _T('|'), _T(" \t"));
	tstringv str1, str2;
	split.GetSubstr(str1);
	split.GetSubstr(str2);

	tcout << std::format(_T("str1 = '{}', str2 = '{}'"), str1.data(), str2.data()) << std::endl;

	return 0;
}